
/*#include "header.h"


using namespace std;

int main(int argc, char* argv[]) {
	string input;

	QueryTree* tree = new QueryTree();

	Preprocessor p;

	while(getline(cin,input)){
		if(input == "quit") 
			break;
		if(input == "evaluate") {
			//Evaluator e(tree);
			//e.evaluate();
			continue;
		}

		p.process(input, tree);
	}
	

	//this is to pause the console before  ending
	char c;
	cin>>c;
	return 0;
}*/

#include <string>
#include <iostream>
#include <cstring>
using namespace std;

#include "Preprocessor.h"
#include "Evaluator.h"
#include "VariableTable.h"
#include "QueryTree2.h"
#include "QueryTreeTuple.h"


int main() {
	string input;

	//getline(cin, input);

	Preprocessor p;
	//input = "procedure p, q,   r ; stmt s;  select <p, q> such that Modifies(p, q)";
	//input = "procedure p, q, r; select q.stmt# such that Calls(p, q) and Calls(q,r) with p.procName = \"example\"";
	//input = "procedure p;";
	//input = "procedure p; select p\n";

	input = "variable v; select v with v.varName = \"z\"";
	//input = "variable v; select v such that Uses(5, \"y\"";
	
	//input = "variable v; select v";
	p.process(input);

	VarTable v;
	v.insertVar("x");
	v.insertVar("y");
	v.insertVar("z");
	
	Evaluator e(p.getResultList(), p.getSymbolTable(), p.getRelationList(), p.getWithList(), &v);
	e.evaluate();
	char c;
	cin>>c;
}


